package com.cabal.auth.facade;

import com.cabal.auth.dto.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

@Api(value = "惊天用户登录注册公共API", tags = "惊天用户登录注册公共API")
@RequestMapping("cabal/common")
public interface CabalCommonFacade {

    @ApiOperation(value = "注册帐号")
    @PostMapping("register")
    String register(@RequestBody CabalUserInfoDTO cabalUserInfoDTO);

    @ApiOperation("发送短信验证码")
    @PostMapping("/sendMessage")
    String sendMessage(@RequestBody SendMessageDTO dto, HttpServletRequest request);

    @ApiOperation("检查帐号是否被注册")
    @PostMapping("/checkAccount")
    String checkAccount(@RequestBody CabalUserInfoDTO cabalUserInfoDTO);

    @ApiOperation("根据角色名查找账号")
    @GetMapping("/getAccountByUserName")
    List<String> getAccountByUserName(@RequestParam("userName") String userName, HttpServletRequest request, HttpServletResponse response);

    @ApiOperation("批量加密手机号")
    @GetMapping("/batchEncryptPhone")
    String batchEncryptPhone(HttpServletRequest request);

    @ApiOperation("根据明文手机号查询加密字符串")
    @GetMapping("/getEncryptPhoneByPhone")
    void getEncryptPhoneByPhone(@RequestParam("phone") String phone, HttpServletRequest request, HttpServletResponse response);

    @ApiOperation("根据加密手机号查询明文字符串")
    @GetMapping("/getPhoneByEncryptPhone")
    void getPhoneByEncryptPhone(@RequestParam("encryptPhone") String encryptPhone, HttpServletRequest request, HttpServletResponse response);

    @ApiOperation("删除黑名单")
    @GetMapping("/deleteBlackList")
    void deleteBlackList(@Param("phone") String phone, HttpServletRequest request, HttpServletResponse response);

    @ApiOperation("商城购买商品")
    @PostMapping("/mallShopBuyItems")
    String mallShopBuyItems(@RequestBody CabalMallBuyItemDTO cabalMallBuyItemDTO, HttpServletRequest request);

    @ApiOperation("初始化商品列表")
    @PostMapping("/initMallItems")
    String initMallItems();

    @ApiOperation("查询Alz排行榜")
    @PostMapping("/searchRankInfoList")
    List<CabalRankInfoDTO> searchRankInfoList(@RequestBody CabalAuthDTO cabalAuthDTO, HttpServletRequest request);

    @ApiOperation("商城获取账号信息")
    @GetMapping("/getAccountInfo")
    CabalMallAuthDTO getAccountInfo(@Param("userNum") String userNum, @Param("authKey") String authKey, HttpServletRequest request);

    @ApiOperation("查询购买记录")
    @GetMapping("/searchMallBuyRecordList")
    List<MallBuyRecordDTO> searchMallBuyRecordList(@Param("userNum") String userNum);

    @ApiOperation("查询商品列表")
    @GetMapping("/searchMallSellItemList")
    List<MallSellItemDTO> searchMallSellItemList(@Param("category") String category);

    @ApiOperation("查询角色列表")
    @GetMapping("/searchCharacterList")
    List<CabalCharacterInfoDTO> searchCharacterList(@Param("account") String account);

    @ApiOperation("根据手机号查询加密/明文字符串")
    @GetMapping("/getResultByEncryptPhoneOrDecryptPhone")
    String getResultByEncryptPhoneOrDecryptPhone(@RequestParam("encryptPhone") String encryptPhone, @RequestParam("decryptPhone") String decryptPhone);

    @ApiOperation("根据角色ID赋予称号")
    @GetMapping("/setTitleByCharacterIdx")
    String setTitleByCharacterIdx(@RequestParam("characterIdx") String characterIdx, @RequestParam("titleId") Integer titleId);

    @ApiOperation("全面解封账号")
    @GetMapping("/unsealAccount")
    String unsealAccount(@RequestParam("account") String account);

    @ApiOperation("变更国家")
    @PostMapping("/updateNation")
    String updateNation(@RequestBody CabalUpdateNationDTO cabalUpdateNationDTO);

    @ApiOperation("模糊查询商品列表")
    @GetMapping("/searchItemListByKeyword")
    List<MallSellItemDTO> searchItemListByKeyword(@Param("itemNameKeyword") String itemNameKeyword);

    @ApiOperation("更新网关配置")
    @PostMapping("/updateGatewayConfig")
    String updateGatewayConfig(@RequestBody UpdateGatewayConfigDTO updateGatewayConfigDTO);

    @ApiOperation("更新网关配置")
    @GetMapping("/getUpdateGatewayConfigDTO")
    UpdateGatewayConfigDTO getUpdateGatewayConfigDTO();

    @ApiOperation("查询元宝背包数据列表")
    @GetMapping("/searchCashBackPackList")
    List<CabalCashBackPackDTO> searchCashBackPackList(@Param("account") String account);

    @ApiOperation("查询元宝背包数据列表")
    @GetMapping("/updateCashBackPackDurationIdx")
    String updateCashBackPackDurationIdx(@Param("account") String account);

    @ApiOperation("执行删除角色")
    @GetMapping("/delCharacter")
    String delCharacter(@Param("characterIdx") String characterIdx);

    @ApiOperation("新增套装")
    @PostMapping("/insertCabalToolItemSuit")
    String insertCabalToolItemSuit(@RequestBody CabalToolItemSuitDTO cabalToolItemSuitDTO);

    @ApiOperation("更新")
    @PostMapping("/updateCabalToolItemSuit")
    String updateCabalToolItemSuit(@RequestBody CabalToolItemSuitDTO cabalToolItemSuitDTO);

    @ApiOperation("查询套装列表")
    @GetMapping("/selectCabalToolItemSuitList")
    List<CabalToolItemSuitDTO> selectCabalToolItemSuitList();

    @ApiOperation("根据ID删除套装")
    @GetMapping("/deleteCabalToolItemSuitById")
    String deleteCabalToolItemSuitById(@RequestParam("id") String id);

    @ApiOperation("新增发送装备")
    @PostMapping("/insertCabalToolItemScript")
    String insertCabalToolItemScript(@RequestBody CabalToolItemScriptDTO cabalToolItemScriptDTO);

    @ApiOperation("更新发送装备")
    @PostMapping("/updateCabalToolItemScript")
    String updateCabalToolItemScript(@RequestBody CabalToolItemScriptDTO cabalToolItemScriptDTO);

    @ApiOperation("查询发送装备列表")
    @GetMapping("/selectCabalToolItemScriptList")
    List<CabalToolItemScriptDTO> selectCabalToolItemScriptList(@RequestParam("suitName") String suitName);

    @ApiOperation("根据Id删除发送装备")
    @GetMapping("/deleteCabalToolItemScriptById")
    String deleteCabalToolItemScriptById(@RequestParam("id") String id);

    @ApiOperation("发送装备")
    @PostMapping("/sendEquipment")
    String sendEquipment(@RequestBody CabalToolItemScriptDTO cabalToolItemScriptDTO);

    @ApiOperation("发送套装")
    @PostMapping("/sendItemSuit")
    String sendItemSuit(@RequestBody CabalToolItemSuitDTO cabalToolItemSuitDTO);

    @ApiOperation("撤回发送")
    @GetMapping("/revokeSend")
    String revokeSend(@RequestParam("tranNo") String tranNo);

    @ApiOperation("清理元宝背包数据")
    @GetMapping("/clearCashRecord")
    String clearCashRecord(@Param("account") String account);

    @ApiOperation("克隆套装")
    @PostMapping("/copySuit")
    String copySuit(@RequestBody CabalToolItemSuitDTO cabalToolItemSuitDTO);

    @ApiOperation("设置VIP等级")
    @GetMapping("/updateVipLevel")
    String updateVipLevel(@RequestParam("account") String account, @RequestParam("vipLevel") Integer vipLevel);

    @ApiOperation("查询服装列表")
    @GetMapping("/selectGarmentCallInfoList")
    List<CabalAvatarItemDTO> selectGarmentCallInfoList(@RequestParam("account") String account);

    @ApiOperation("查询武器装饰列表")
    @GetMapping("/selectWeaponCallInfoList")
    List<WeaponAvatarItemDTO> selectWeaponCallInfoList(@RequestParam("account") String account);

    @ApiOperation("查询头饰列表")
    @GetMapping("/selectHeadWearCallInfoList")
    List<CabalAvatarItemDTO> selectHeadWearCallInfoList(@RequestParam("account") String account);

    @ApiOperation("查询本周奖池")
    @GetMapping("/getLotteryPoolConfig")
    CabalLotteryPoolConfigDTO getLotteryPoolConfig(@Param("userNum") String userNum, @Param("authKey") String authKey, HttpServletRequest request);

    @ApiOperation("查询本人中奖记录")
    @GetMapping("/searchCabalPrizeDrawLogList")
    List<CabalPrizeDrawLogDTO> searchCabalPrizeDrawLogList(@Param("userNum") String userNum);

    @ApiOperation("查询拾取公告商品集合")
    @GetMapping("/selectPickUpItemList")
    List<PickUpItemDTO> selectPickUpItemList();

}
